<%--
  Created by IntelliJ IDEA.
  User: zhangxr103
  Date: 2014/10/21
  Time: 14:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%
    String phone = null;
    Object number = request.getParameter("number");
    if (number != null && !number.toString().isEmpty() || request.getSession().getAttribute("number") != null) {
        if (number != null && !number.toString().isEmpty()) {
            request.getSession().setAttribute("number", number);
        }
        phone = request.getSession().getAttribute("number").toString();
    } else {
        response.sendRedirect(request.getContextPath()+"/pages/startpage.jsp");
    }
%>

<html>
<head>
    <title>社交网络</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <script src="<%=request.getContextPath()%>/js/jquery/jquery-1.9.1.js" type="text/javascript"></script>
    <script src="<%=request.getContextPath()%>/js/bootstrap/bootstrap.min.js" type="text/javascript"></script>
    <script src="<%=request.getContextPath()%>/js/highcharts/highcharts.js" type="text/javascript"></script>
    <link href="<%=request.getContextPath()%>/css/bootstrap-combined.min.css" rel="stylesheet" media="screen">
    <script src="<%=request.getContextPath()%>/js/datavjs-master/build/deps.js"></script>
    <!-- force -->
    <script src="<%=request.getContextPath()%>/js/datavjs-master/deps/seajs/sea.js"></script>
    <script>
        var dir = '<%=request.getContextPath()%>/js/datavjs-master';
        seajs.config({
            alias: {
                'DataV': dir + '/lib/datav.js',
                'Force': dir + '/lib/charts/force.js'
            }
        });
    </script>
    <style type="text/css">
        #chart {
            /*border-top: 1px dashed #F00;*/
            /*border-bottom: 1px dashed #F00;*/
            padding-left: 20px;
        }

        .textArea {
            border: 2px solid black;
            color: black;
            font-family: monospace;
            height: 3in;
            overflow: auto;
            padding: 0.5em;
            width: 750px;
        }
    </style>
</head>
<body>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12" >
            <div class="span12">
                <img src="<%=request.getContextPath()%>/img/header.jpg" style="width:100%;height:25%;" >
            </div>
        </div>
    </div>
    <div class="row-fluid">
        <div class="span12">
            <ul class="nav nav-tabs">
                <li >
                    <a href="<%=request.getContextPath()%>/pages/privacy.jsp">基本信息</a>
                </li>
                <%--<li >--%>
                    <%--<a href="<%=request.getContextPath()%>/pages/rank.jsp">信用排名</a>--%>
                <%--</li>--%>
                <li>
                    <a href="<%=request.getContextPath()%>/pages/finance.jsp">消费走势</a>
                </li>
                <li>
                    <a href="<%=request.getContextPath()%>/pages/location.jsp">位置跟踪</a>
                </li>
                <li class="active">
                    <a href="<%=request.getContextPath()%>/pages/socialnetwork.jsp">社交网络</a>
                </li>
                <li class="dropdown pull-right">
                    <a href="#" data-toggle="dropdown" class="dropdown-toggle"><%=phone%><strong class="caret"></strong></a>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="#"></a>
                        </li>
                        <li>
                            <a href="#">设置栏目</a>
                        </li>
                        <li>
                            <a href="#">更多设置</a>
                        </li>
                        <li class="divider">
                        </li>
                        <li>
                            <a href="<%=request.getContextPath()%>/pages/startpage.jsp">退出</a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <div class="row-fluid">
        <div class="span12">
            <div class="body">
                <%--<h1 id="forcedirected_graph">Force-Directed Graph</h1>--%>
                <div class="gallery" id="chart"></div>
            </div>
            <script>
                seajs.use(["Force", "DataV"], function (Force, DataV) {
                    // DataV.changeTheme("datav");
                    var net = new Force("chart", {
                        width: 800,
                        height: 600,
                        tag: true
                    });
                    DataV.csv("<%=request.getContextPath()%>/file/sns_data.csv", function (source) {
                        net.setSource(source, {id: 0, name: 1, nValue: 2, source: 3, target: 4, lValue: 5});
                        net.render();
                    });
                });
            </script>
        </div>
    </div>
</div>
<div id="bottom" style="clear:both;bottom:0;text-align:center;vertical-align:middle;width:100%;border:0px;"><span>版权所有@中国联合网络通信有限公司研究院</span></div>
</body>
</html>
